@extends('master')
@section('title')
<title>个人设置</title>
@endsection
@section('style')
<style>
	#content{margin-top: 80px;}
	#tab_jbzl tr{height: 40px;line-height: 40px;}
	#tab_jbzl tr th{text-align: right;padding: 10px;}
	#tab_jbzl tr td{padding: 10px;}
	#tab_jbzl tr td img{border-radius: 5px;cursor: pointer;}
	.info{color: #999;font-size: 12px;}
	#tab_acount tr th{text-align: right;padding: 10px;width: 80px;line-height: 40px;}
	#tab_acount tr td{padding: 10px;}
</style>
@endsection
@section('content')
<div id="content" class="container">
		<div class="search-content col-md-12">
		    <div class="panel panel-default">
		        <div class="panel-body">
		            <ul class="nav nav-tabs">
		                <li class="active"><a href="#jbzl" data-toggle="tab" aria-expanded="false">基本资料</a> </li>
		                <li class=""><a href="#acount" data-toggle="tab" aria-expanded="false">账号和密码</a> </li>
		                <!-- <li class=""><a href="#message" data-toggle="tab" aria-expanded="false">消息和邮件</a> </li> -->
		                <!-- <li class=""><a href="#forbid" data-toggle="tab" aria-expanded="true">屏蔽</a> </li> -->
		            </ul>

		            <div class="tab-content">
		                <div class="tab-pane fade active in" id="jbzl">
		                    <form>
		                    	<table id="tab_jbzl" class="col-md-12">
									<tr>
										<th width="100">头像 : </th>
										<td><img id="setFace" width="50" src="{{$user->face}}" alt="">
										<!-- <input type="hidden" name="face" value="{{$user->face}}"> --></td>
									</tr>
									<tr>
										<th>性别 : </th>
										<td>
											<input type="radio" name="sex" value="0" @if($user->datail->sex == 0) checked @endif> 女
											<input type="radio" name="sex" value="1" @if($user->datail->sex == 1) checked @endif> 男
											<input type="radio" name="sex" value="2" @if($user->datail->sex == 2) checked @endif> 保密
										</td>
									</tr>
									<tr>
										<th>地址 : </th>
										<td>
											<input class="form-control" type="text" name="address" value="{{$user->datail->address}}">
											<!-- <div class="hide">
												<select name="address[0]" id=""><option value="">请选择</option></select>
												<select name="address[1]" id=""><option value="">请选择</option></select>
												<select name="address[2]" id=""><option value="">请选择</option></select>
											</div> -->
										</td>
									</tr>
									<tr>
										<th>职业 : </th>
										<td><input class="form-control" type="text" name="work" value="{{$user->datail->work}}"></td>
									</tr>
									<tr>
										<th>学历 : </th>
										<td><input class="form-control" type="text" name="school" value="{{$user->datail->school}}"></td>
									</tr>
									<tr>
										<th>人生格言 : </th>
										<td><input class="form-control" type="text" name="autograph" value="{{$user->datail->autograph}}"></td>
									</tr>
									<tr>
										<th>个人简介 : </th>
										<td><input class="form-control" type="text" name="intro" value="{{$user->datail->intro}}"></td>
									</tr>
									<tr>
										<th colspan="2"><span id="setSave" class="btn btn-primary">保存</span></th>
									</tr>
								</table>
								<script src="/assets/home/js/setting.js"></script>
							</form>
		                </div>
		                <div class="tab-pane fade" id="acount">
		                    <form action="">
		                    	<table id="tab_acount" class="col-md-12">
									<tr>
										<th width="100">昵称 : </th>
										<td> <input class="form-control" type="text" name="name" value="{{$user->name}}"></td>
									</tr>
									<tr>
										<th>邮箱 : </th>
										<td>
											@if($user->email == '')
											<input class="form-control" type="email" name="email" value="{{$user->email}}">
											<span id="setEmail" class="btn btn-primary btn-xs">保存</span>
											@else
											<input class="form-control" type="email" name="email" value="{{$user->email}}" style="display: none;">
											<span>{{$user->email}}</span>
											<span class="btn btn-info btn-xs changeEmail">修改</span>
											@endif
										</td>
									</tr>
									<tr>
										<th>电话 : </th>
										<td>
											@if($user->phone == '')
											<input class="form-control" type="text" name="phone" value="{{$user->phone}}">
											<span id="setPhone" class="btn btn-primary btn-xs">保存</span>
											@else
											<input class="form-control" type="text" name="phone" value="{{$user->phone}}" style="display: none;" />
											<span>{{$user->phone}}</span>
											<span class="btn btn-info btn-xs changePhone">修改</span>
											@endif
										</td>
									</tr>
									<tr>
										<th>密码 : </th>
										<td>
											<a href="/repasswd" class="btn btn-danger">修改密码</a>
										</td>
									</tr>
								</table>
							</form>
		                </div>
		                <!-- <div class="tab-pane fade" id="message">
		                    <h4>问题</h4>
		                    <div class="item col-md-12">
		                    	<ul class="list-unstyled">
		                    			                    	</ul>
		                    </div>
		                </div>
		                <div class="tab-pane fade" id="forbid">
		                    <h4>用户</h4>
		                    <div class="item col-md-12">
		                    	<ul class="list-unstyled">
		                    			                    	</ul>
		                    </div>
		                </div> -->
		            </div>
		            <!-- 信息提示模态框 -->
		            <div id="noticeModal" class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel">
					  <div class="modal-dialog modal-sm" role="document">
					    <div id="notice" class="modal-content text-center" style="height: 80px;line-height:80px;font-size: 20px;">

					    </div>
					  </div>
					</div>
		        </div>
		    </div>
		</div>
	</div>
@endsection